# coding=utf-8
import numpy as np

# a = np.array([[10, 20], [30, 40]])
# b = np.arange(4).reshape((2, 2))
#
# c = a * b
#
# c_dot = np.dot(a, b)
# c_dot_2 = a.dot(b)
# print(a)
# print(b)
# print(c)
# print(c_dot)
# print(c_dot_2)

# a = np.random.random((2, 4))
# print(a)
# # axis 0代表每一列 1代表每一行
# print(np.sum(a, axis=0))
# print(np.min(a, axis=1))
# print(np.max(a, axis=1))

A = np.arange(14, 2, -1).reshape((2, 6))
a = np.argmin(A)
print(A)
print(np.argmax(A))
print(A.mean())
print(np.median(A))
print(np.cumsum(A))
print(np.diff(A))
print(np.nonzero(A))
print(np.sort(A))
print(np.transpose(A))
print((A.T).dot(A))
print(np.clip(A, 5, 10))
print(np.clip(A,5,10).mean())
